{volist name="sortlist" id="oneRs"}
    {empty name="oneRs.subOne"}
        <li><a class="{if input('sortid') eq $oneRs.id}active{/if}" href="{$oneRs.url}">{$oneRs.title}</a></li>
    {else /}
        <li>
            <a class="{if input('sortid') eq $oneRs.id}active{/if}" data-toggle="collapse" aria-expanded="false" href="#collapse{$oneRs.id}">{$oneRs.title}<span class="float-right mr-2">+</span></a>
            <ul id="collapse{$oneRs.id}" class="collapse {if deep_in_array($oneRs['id'],$parent_arr) eq true}show{/if}">
                {volist name="oneRs.subOne" id="twoRs"}
                    {empty name="twoRs.subTwo"}
                        <li><a class="{if input('sortid') eq $twoRs.id}active{/if}" href="{$twoRs.url}">{$twoRs.title}</a></li>
                    {else /}
                        <li><a class="{if input('sortid') eq $twoRs.id}active{/if}" href="{$twoRs.url}">{$twoRs.title}</a>
                            <ul>
                                {volist name="twoRs.subTwo" id="threeRs"}
                                    {empty name="threeRs.subThree"}
                                        <li><a class="{if input('sortid') eq $threeRs.id}active{/if}" href="{$threeRs.url}">{$threeRs.title}</a></li>
                                    {else /}
                                        <li><a class="{if input('sortid') eq $threeRs.id}active{/if}" href="{$threeRs.url}">{$threeRs.title}</a>
                                            <ul>
                                                {volist name="threeRs.subThree" id="fourRs"}
                                                    <li><a class="{if input('sortid') eq $fourRs.id}active{/if}" href="{$fourRs.url}">{$fourRs.title}</a></li>
                                                {/volist}
                                            </ul>
                                        </li>
                                    {/empty}
                                {/volist}
                            </ul>
                        </li>
                    {/empty}
                {/volist}
            </ul>
        </li>
    {/empty}
{/volist}